package shogi;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JFrame;

public class OptionsMenu {

    private JMenu game;
    private JMenu resource;
    private JMenu file;

    public JMenu getGame() {
        return game;
    }

    public void setGame(JMenu game) {
        this.game = game;
    }

    public JMenu getResource() {
        return resource;
    }

    public void setResource(JMenu resource) {
        this.resource = resource;
    }

    public JMenu getFile() {
        return file;
    }

    public void setFile(JMenu file) {
        this.file = file;
    }

    public void setBar(Options options, JFrame frame) {
        options.setMb(new JMenuBar());
        file = new JMenu("File");
        game = new JMenu("Game");
        resource = new JMenu("Resource");
        frame.setJMenuBar(options.getMb());
        options.getMb().add(file);
        options.getMb().add(game);
        options.getMb().add(resource);
        setFile(options);
        options.setResource();
        options.setGame();
    }

    public void setFile(Options options) {
        options.setSave(new JMenuItem("Save"));
        options.setQuit(new JMenuItem("Exit"));
        options.setLoad(new JMenuItem("Load"));
        file.add(options.getSave());
        file.add(options.getLoad());
        file.addSeparator();
        file.add(options.getQuit());
    }
}